import { FROM_DATA } from '@/views/marketing/unpack/types'

import { Page } from './commonTypes'
export type UnpackListRes = {
  dataList: Array<UnpackListItem>
  page: Page
}
export type UnpackListItem = {
  activityEndedTips: string
  activityIndexBanner: string
  activityInfo: string
  activityMobileBackground: string
  activityName: string
  activityNotStartedTips: string
  activityTemplate: number
  buttonBackground: string
  buttonWord: string
  createTime: string
  createUser: number
  endTime: string
  id: number
  losingTips: string
  pointNotEnoughTips: string
  startTime: string
  /**
   * 活动状态
   * - `0` 未开始
   * - `1` 进行中
   * - `2` 已结束
   */
  status: number
  unqualifiedTips: string
  updateTime: string
  updateUser: number
  winningTips: string
}

export type CreateUnpackReq = Omit<FROM_DATA, 'date'> & {
  startTime: string
  endTime: string
}

export type ResultRes = {
  dataList: Array<ResultResItem>
  page: Page
}

export type ResultResItem = {
  createTime: string
  mobile: string
  nickname: string
  prizeInfo: string
  prizeType: string
}
export type UpdateStatusReq = {
  /** 活动id */
  activityInfoId: string | number
  /** 状态
   * - `1`开启
   * - `2`关闭
   *
   */
  status: number
}
export type CheckedActivityTimeReq = {
  endTime: string
  id: string
  startTime: string
}
